object Fibonacci {
    def main() : Unit = {
    	if (new Fibo().PrintFibos(45)) println("Success!");
    }
}
class Fibo {
	var x : Int;
	var y : Int;
	
    def NextFibo() : Int = {
    	var z : Int;
    	z = x + y;
    	x = y;
    	y = z;
    	return z;
    }
    def PrintFibos(c : Int) : Bool = {
    	var i : Int;
    	i = 0;
    	x = 0;
    	y = 1;
    	while (i < c) {
    		println(this.NextFibo());
    		i = i + 1;
    	}
    	return true;
    }
}
